package bdz.projects.sc.support
{
	import bdz.projects.sc.events.SCEvent;
	
	import com.greensock.*;
	import com.greensock.easing.*;
	
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;

	public class SCFooterPanel extends MovieClip
	{
		private var startButton:MovieClip;
		public function SCFooterPanel()
		{
			super();
			addEventListener(Event.ADDED_TO_STAGE, initializeComponent);
		}
		protected function assignStageElements():void{
			startButton = this["s"];
			startButton["sb"].addEventListener(MouseEvent.CLICK, onStartClick);
			x = Math.ceil(stage.stageWidth*.5);
			y = stage.stageHeight+(height*2);
			TweenMax.to(this, 1, {ease:Strong.easeInOut, y:stage.stageHeight});		
		}
		protected function onStartClick(evt:MouseEvent):void{
			dispatchEvent(new SCEvent(SCEvent.NOTIFY_START));
		}
		protected function initializeComponent(evt:Event):void{
			assignStageElements();
		}
	}
}